/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DAL;

import java.sql.*;

/**
 *
 * @author Alumno
 */
public class ImagenDAL {

    Conectarse con;

    public ImagenDAL() {
        con = new Conectarse();
    }




    public int obtenerFoto(int userId){

       Statement s = con.crearSentencia();
       try{
           ResultSet r = s.executeQuery("select foto from perfil where fk_user_id="+userId);
           return r.getInt(5);
       }
       catch(SQLException e){

       }
       return 0;
    }
    
    
}
